package com.schoolcardinfo.beans;

public class Id_StudentInfo {
	private int studentId;//学号
	private String sname;//姓名
	private String sclass;//班级
	private String sdepartment;//学院
	
	@Override
	public String toString() {
		return "Id_StudentInfo [studentId=" + studentId + ", sname=" + sname + ", sclass=" + sclass + ", sdepartment="
				+ sdepartment + "]";
	}

	public int getStudentId() {
		return studentId;
	}

	public void setStudentId(int studentId) {
		this.studentId = studentId;
	}

	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public String getSclass() {
		return sclass;
	}

	public void setSclass(String sclass) {
		this.sclass = sclass;
	}

	public String getSdepartment() {
		return sdepartment;
	}

	public void setSdepartment(String sdepartment) {
		this.sdepartment = sdepartment;
	}

	public Id_StudentInfo(int studentId, String sname, String sclass, String sdepartment) {
		super();
		this.studentId = studentId;
		this.sname = sname;
		this.sclass = sclass;
		this.sdepartment = sdepartment;
	}

	public Id_StudentInfo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((sclass == null) ? 0 : sclass.hashCode());
		result = prime * result + ((sdepartment == null) ? 0 : sdepartment.hashCode());
		result = prime * result + ((sname == null) ? 0 : sname.hashCode());
		result = prime * result + studentId;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Id_StudentInfo other = (Id_StudentInfo) obj;
		if (sclass == null) {
			if (other.sclass != null)
				return false;
		} else if (!sclass.equals(other.sclass))
			return false;
		if (sdepartment == null) {
			if (other.sdepartment != null)
				return false;
		} else if (!sdepartment.equals(other.sdepartment))
			return false;
		if (sname == null) {
			if (other.sname != null)
				return false;
		} else if (!sname.equals(other.sname))
			return false;
		if (studentId != other.studentId)
			return false;
		return true;
	}
}
